import { Link } from 'react-router-dom'

const userInfo = [
  {"name":"lili","operate":"爱好"},
  {"name":"leilei","operate":"爱好"},
  {"name":"dazuo","operate":"爱好"},
  {"name":"dalei","operate":"爱好"},
  {"name":"hudie","operate":"爱好"},
]

const Detail = () => {
  const renderDom = (userInfo) =>{
    return userInfo.map((book) => {
      return (
        <div key={book.name}>
          <div>姓名：{book.name}</div>
          <div>操作：<Link to='/usersList/detail/:id/userHobby'>{book.operate}</Link></div>
        </div>
      )
    })
  }
  const dom = renderDom(userInfo)
  return (
    <div>{dom}</div>
  )
} 
export default Detail